function TbCarouselConfig(params){ 
	 
}

TbCarouselConfig.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new TbCarouselConfig.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new TbCarouselConfig.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new TbCarouselConfig.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.tbccId=function(tbccId){if(this.proxy)return this.getProxy().tbccId(tbccId);  this.put("tbccId", tbccId);return this;};
	/** and tbcc_id is null */
	this.tbccIdNull=function(){if(this.proxy)return this.getProxy().tbccIdNull();if(this.get("tbccIdNot")==null)this.put("tbccIdNot", "");this.put("tbccId", null);return this;};
	/** not .... */
	this.tbccIdNot=function(){if(this.proxy)return this.getProxy().tbccIdNot();this.put("tbccIdNot", "not");return this;};
	this.tbccIdNotNull=function(){if(this.proxy)return this.getProxy().tbccIdNotNull();this.put("tbccIdNot", "not");this.put("tbccId", null);return this;};
	this.tbccIdNot=function(tbccId){if(this.proxy)return this.getProxy().tbccIdNot(tbccId);this.put("tbccIdNot", "not");this.put("tbccId", tbccId);return this;};
		
	/** and tbcc_id <= ? */
	this.tbccIdMin=function(min){if(this.proxy)return this.getProxy().tbccIdMin(min);this.put("tbccIdMin", min);return this;};
	/** and tbcc_id >= ? */
	this.tbccIdMax=function(max){if(this.proxy)return this.getProxy().tbccIdMax(max);this.put("tbccIdMax", max);return this;};
		
		
	this.tbccIdIn=function(ids){
		if(this.proxy)return this.getProxy().tbccIdIn(ids);  this.put("tbccIdIn", ids);return this;
	};	
		 
	
	
	/** 品牌  [Merchant]      **/
	this.tbccBrand=function(tbccBrand){if(this.proxy)return this.getProxy().tbccBrand(tbccBrand);  this.put("tbccBrand", tbccBrand);return this;};
	/** and tbcc_brand is null */
	this.tbccBrandNull=function(){if(this.proxy)return this.getProxy().tbccBrandNull();if(this.get("tbccBrandNot")==null)this.put("tbccBrandNot", "");this.put("tbccBrand", null);return this;};
	/** not .... */
	this.tbccBrandNot=function(){if(this.proxy)return this.getProxy().tbccBrandNot();this.put("tbccBrandNot", "not");return this;};
	this.tbccBrandNotNull=function(){if(this.proxy)return this.getProxy().tbccBrandNotNull();this.put("tbccBrandNot", "not");this.put("tbccBrand", null);return this;};
	this.tbccBrandNot=function(tbccBrand){if(this.proxy)return this.getProxy().tbccBrandNot(tbccBrand);this.put("tbccBrandNot", "not");this.put("tbccBrand", tbccBrand);return this;};
		
		
	this.tbccBrandIn=function(ids){
		if(this.proxy)return this.getProxy().tbccBrandIn(ids);  this.put("tbccBrandIn", ids);return this;
	};	
		 
	
	
	/** 排序     数值越大越排前   **/
	this.tbccSort=function(tbccSort){if(this.proxy)return this.getProxy().tbccSort(tbccSort);  this.put("tbccSort", tbccSort);return this;};
	/** and tbcc_sort is null */
	this.tbccSortNull=function(){if(this.proxy)return this.getProxy().tbccSortNull();if(this.get("tbccSortNot")==null)this.put("tbccSortNot", "");this.put("tbccSort", null);return this;};
	/** not .... */
	this.tbccSortNot=function(){if(this.proxy)return this.getProxy().tbccSortNot();this.put("tbccSortNot", "not");return this;};
	this.tbccSortNotNull=function(){if(this.proxy)return this.getProxy().tbccSortNotNull();this.put("tbccSortNot", "not");this.put("tbccSort", null);return this;};
	this.tbccSortNot=function(tbccSort){if(this.proxy)return this.getProxy().tbccSortNot(tbccSort);this.put("tbccSortNot", "not");this.put("tbccSort", tbccSort);return this;};
		
	/** and tbcc_sort <= ? */
	this.tbccSortMin=function(min){if(this.proxy)return this.getProxy().tbccSortMin(min);this.put("tbccSortMin", min);return this;};
	/** and tbcc_sort >= ? */
	this.tbccSortMax=function(max){if(this.proxy)return this.getProxy().tbccSortMax(max);this.put("tbccSortMax", max);return this;};
		
		
	this.tbccSortIn=function(ids){
		if(this.proxy)return this.getProxy().tbccSortIn(ids);  this.put("tbccSortIn", ids);return this;
	};	
		 
	
	
	/** 跳转类型    1:商品页 2:活动页 3:代理卡页 4:合伙人页 5:余额优惠充值     **/
	this.tbccType=function(tbccType){if(this.proxy)return this.getProxy().tbccType(tbccType);  this.put("tbccType", tbccType);return this;};
	/** and tbcc_type is null */
	this.tbccTypeNull=function(){if(this.proxy)return this.getProxy().tbccTypeNull();if(this.get("tbccTypeNot")==null)this.put("tbccTypeNot", "");this.put("tbccType", null);return this;};
	/** not .... */
	this.tbccTypeNot=function(){if(this.proxy)return this.getProxy().tbccTypeNot();this.put("tbccTypeNot", "not");return this;};
	this.tbccTypeNotNull=function(){if(this.proxy)return this.getProxy().tbccTypeNotNull();this.put("tbccTypeNot", "not");this.put("tbccType", null);return this;};
	this.tbccTypeNot=function(tbccType){if(this.proxy)return this.getProxy().tbccTypeNot(tbccType);this.put("tbccTypeNot", "not");this.put("tbccType", tbccType);return this;};
		
		
	this.tbccTypeIn=function(ids){
		if(this.proxy)return this.getProxy().tbccTypeIn(ids);  this.put("tbccTypeIn", ids);return this;
	};	
		 
	
	
	/** 图片        **/
	this.tbccPicture=function(tbccPicture){if(this.proxy)return this.getProxy().tbccPicture(tbccPicture);  this.put("tbccPicture", tbccPicture);return this;};
	/** and tbcc_picture is null */
	this.tbccPictureNull=function(){if(this.proxy)return this.getProxy().tbccPictureNull();if(this.get("tbccPictureNot")==null)this.put("tbccPictureNot", "");this.put("tbccPicture", null);return this;};
	/** not .... */
	this.tbccPictureNot=function(){if(this.proxy)return this.getProxy().tbccPictureNot();this.put("tbccPictureNot", "not");return this;};
	this.tbccPictureNotNull=function(){if(this.proxy)return this.getProxy().tbccPictureNotNull();this.put("tbccPictureNot", "not");this.put("tbccPicture", null);return this;};
	this.tbccPictureNot=function(tbccPicture){if(this.proxy)return this.getProxy().tbccPictureNot(tbccPicture);this.put("tbccPictureNot", "not");this.put("tbccPicture", tbccPicture);return this;};
		
		 
	
	
	/** 商品  [Commodity]      **/
	this.tbccCommodity=function(tbccCommodity){if(this.proxy)return this.getProxy().tbccCommodity(tbccCommodity);  this.put("tbccCommodity", tbccCommodity);return this;};
	/** and tbcc_commodity is null */
	this.tbccCommodityNull=function(){if(this.proxy)return this.getProxy().tbccCommodityNull();if(this.get("tbccCommodityNot")==null)this.put("tbccCommodityNot", "");this.put("tbccCommodity", null);return this;};
	/** not .... */
	this.tbccCommodityNot=function(){if(this.proxy)return this.getProxy().tbccCommodityNot();this.put("tbccCommodityNot", "not");return this;};
	this.tbccCommodityNotNull=function(){if(this.proxy)return this.getProxy().tbccCommodityNotNull();this.put("tbccCommodityNot", "not");this.put("tbccCommodity", null);return this;};
	this.tbccCommodityNot=function(tbccCommodity){if(this.proxy)return this.getProxy().tbccCommodityNot(tbccCommodity);this.put("tbccCommodityNot", "not");this.put("tbccCommodity", tbccCommodity);return this;};
		
		
	this.tbccCommodityIn=function(ids){
		if(this.proxy)return this.getProxy().tbccCommodityIn(ids);  this.put("tbccCommodityIn", ids);return this;
	};	
		 
	
	
	/** 活动  [TbActivityText]      **/
	this.tbccActivity=function(tbccActivity){if(this.proxy)return this.getProxy().tbccActivity(tbccActivity);  this.put("tbccActivity", tbccActivity);return this;};
	/** and tbcc_activity is null */
	this.tbccActivityNull=function(){if(this.proxy)return this.getProxy().tbccActivityNull();if(this.get("tbccActivityNot")==null)this.put("tbccActivityNot", "");this.put("tbccActivity", null);return this;};
	/** not .... */
	this.tbccActivityNot=function(){if(this.proxy)return this.getProxy().tbccActivityNot();this.put("tbccActivityNot", "not");return this;};
	this.tbccActivityNotNull=function(){if(this.proxy)return this.getProxy().tbccActivityNotNull();this.put("tbccActivityNot", "not");this.put("tbccActivity", null);return this;};
	this.tbccActivityNot=function(tbccActivity){if(this.proxy)return this.getProxy().tbccActivityNot(tbccActivity);this.put("tbccActivityNot", "not");this.put("tbccActivity", tbccActivity);return this;};
		
		
	this.tbccActivityIn=function(ids){
		if(this.proxy)return this.getProxy().tbccActivityIn(ids);  this.put("tbccActivityIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有轮播配置 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/business/carouselconfig.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取轮播配置分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/business/carouselconfig.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取轮播配置 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/business/carouselconfig.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

TbCarouselConfig.get = function(id){
	var protocol = ux.ajax("/admin/business/carouselconfig.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.tbCarouselConfig;
	return null;
}

TbCarouselConfig.where = new TbCarouselConfig.Where(0,true);